#Qt lib
find_package(Qt5Core REQUIRED)
find_package(Qt5Widgets REQUIRED)
find_package(Qt5Gui REQUIRED)
find_package(Qt5LinguistTools REQUIRED)
#find_package(Qt5Charts REQUIRED)
find_package(Qt5Network REQUIRED)
find_package(Qt5 COMPONENTS PrintSupport REQUIRED)

#spdloglib
include_directories(${PROJECT_SOURCE_DIR}/depends/SPDLOG/include)
link_directories(${PROJECT_SOURCE_DIR}/depends/SPDLOG/lib)

#libmodbus lib
include_directories(${PROJECT_SOURCE_DIR}/depends/LIBMODBUS/include)
link_directories(${PROJECT_SOURCE_DIR}/depends/LIBMODBUS/lib)

#OSGlib
include_directories(${PROJECT_SOURCE_DIR}/depends/OSG/include)
link_directories(${PROJECT_SOURCE_DIR}/depends/OSG/lib)

#OSGQtlib
include_directories(${PROJECT_SOURCE_DIR}/depends/OSGQT/include)
link_directories(${PROJECT_SOURCE_DIR}/depends/OSGQT/lib)

#boost_1_72_0Lib
#mongoDB depends
include_directories(${PROJECT_SOURCE_DIR}/depends/boost_1_72_0/include)
link_directories(${PROJECT_SOURCE_DIR}/depends/boost_1_72_0/lib)

#MONGOCXXlib
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH}
    "${PROJECT_SOURCE_DIR}/depends/mongo-cxx-driver-r3.4.0/lib/cmake")

find_package(libmongocxx REQUIRED)

#SOEMlib
include_directories(${PROJECT_SOURCE_DIR}/depends/SOEM/include)
include_directories(${PROJECT_SOURCE_DIR}/depends/oshw/win32/wpcap/Include)

link_directories(${PROJECT_SOURCE_DIR}/depends/SOEM/lib)
link_directories(${PROJECT_SOURCE_DIR}/depends//oshw/win32/wpcap/Lib/x64)

#RTC5
include_directories(${PROJECT_SOURCE_DIR}/depends/RTC5/include)
link_directories(${PROJECT_SOURCE_DIR}/depends/RTC5/lib)

add_subdirectory(3rdParty)
add_subdirectory(app)
add_subdirectory(gui)
add_subdirectory(main)
